<template>
	<view class="page">
		<myNavBar barIcon="back" title="认证"></myNavBar>
		<view class="mine-edit">
			<view class="content">
				<image src="../../static/image/realauth.png" mode=""></image>
				<text>认证</text>
				<view>
					开始认证了
				</view>
			</view>
			<view class="buttons">
				<view>
					<button v-if="userInfo.realauth == null" type="default"><uni-icons type="checkbox"
							size="25"></uni-icons>已实名</button>
					<button v-else type="primary" @click="goIdCard()">实名认证</button>
				</view>
				<view>
					<button v-if="!userInfo.lowyerCard" type="default"><uni-icons type="checkbox"
							size="25"></uni-icons>律师资格已认证</button>
					<button v-else type="primary" @click="goLegalQualification()">律师职业资格认证</button>
				</view>


			</view>
		</view>
	</view>
</template>

<script>
	// import face from "@/uni_modules/mcc-face/index.js"
	export default {
		data() {
			return {
				userInfo: {
					lowyerCard: "",
					userId: "",
					realauth: "",
				},
				fileData: "",
				imageValue: []
			};
		},
		components: {},
		methods: {
			goIdCard() {
				uni.navigateTo({
					url: `/pages/mine/idCard?id=${this.userInfo.userId}`
					// url: `/pages/mine/users`
				})
				// face.open(['a', 'b', 'c', 'b', 'c'], function(e) {
				// 	console.log(e)
				// })
			},
			goLegalQualification() {
				uni.navigateTo({
					url: `/pages/mine/legalQualification?id=${this.userInfo.userId}`
				})
			},
		},
		onLoad(options) {
			console.log('options==================>', options);
			this.userInfo.userId = options.id;
			this.userInfo.realauth = options.realauth;
			this.userInfo.lowyerCard = options.lowyerCard;
		},
	};
</script>

<style scoped lang="scss">
	.mine-edit {
		margin: 50rpx;

		.content {
			height: 350rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			& image {
				width: 60rpx;
				height: 60rpx;
				margin: 0 15rpx;
			}
		}

		.buttons {
			button {
				margin: 10rpx;
			}
		}
	}

	.radio {
		margin-right: 20rpx;
	}
</style>